\section{Qua\-Zip\-New\-Info Struct Reference}
\label{structQuaZipNewInfo}\index{QuaZipNewInfo@{QuaZipNewInfo}}
Information about a file to be created.  


{\tt \#include $<$quazipnewinfo.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{Qua\-Zip\-New\-Info} (const QString \&\bf{name})
\begin{CompactList}\small\item\em Constructs \doxyref{Qua\-Zip\-New\-Info}{p.}{structQuaZipNewInfo} instance. \item\end{CompactList}\item 
\bf{Qua\-Zip\-New\-Info} (const QString \&\bf{name}, const QString \&file)
\begin{CompactList}\small\item\em Constructs \doxyref{Qua\-Zip\-New\-Info}{p.}{structQuaZipNewInfo} instance. \item\end{CompactList}\item 
void \bf{set\-File\-Date\-Time} (const QString \&file)
\begin{CompactList}\small\item\em Sets the file timestamp from the existing file. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
QString \bf{name}
\begin{CompactList}\small\item\em File name. \item\end{CompactList}\item 
QDate\-Time \bf{date\-Time}
\begin{CompactList}\small\item\em File timestamp. \item\end{CompactList}\item 
quint16 \bf{internal\-Attr}\label{structQuaZipNewInfo_59ce9776c2ac7547ade8cb4c404c77ab}

\begin{CompactList}\small\item\em File internal attributes. \item\end{CompactList}\item 
quint32 \bf{external\-Attr}\label{structQuaZipNewInfo_ffd1a9700d302e1395bd04f0864da7d0}

\begin{CompactList}\small\item\em File external attributes. \item\end{CompactList}\item 
QString \bf{comment}
\begin{CompactList}\small\item\em File comment. \item\end{CompactList}\item 
QByte\-Array \bf{extra\-Local}\label{structQuaZipNewInfo_b377a81c51cf495c7aeee4f19340a43f}

\begin{CompactList}\small\item\em File local extra field. \item\end{CompactList}\item 
QByte\-Array \bf{extra\-Global}\label{structQuaZipNewInfo_bda207eb3949db3a88761c1b06e6bd58}

\begin{CompactList}\small\item\em File global extra field. \item\end{CompactList}\item 
ulong \bf{uncompressed\-Size}
\begin{CompactList}\small\item\em Uncompressed file size. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Information about a file to be created. 

This structure holds information about a file to be created inside ZIP archive. At least name should be set to something correct before passing this structure to Qua\-Zip\-File::open(Open\-Mode,const Qua\-Zip\-New\-Info\&,int,int,bool). 



\subsection{Constructor \& Destructor Documentation}
\index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!QuaZipNewInfo@{QuaZipNewInfo}}
\index{QuaZipNewInfo@{QuaZipNewInfo}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Qua\-Zip\-New\-Info::Qua\-Zip\-New\-Info (const QString \& {\em name})}\label{structQuaZipNewInfo_46c0f551cf9e6b2131929beb39187aac}


Constructs \doxyref{Qua\-Zip\-New\-Info}{p.}{structQuaZipNewInfo} instance. 

Initializes name with {\em name\/}, date\-Time with current date and time. Attributes are initialized with zeros, comment and extra field with null values. \index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!QuaZipNewInfo@{QuaZipNewInfo}}
\index{QuaZipNewInfo@{QuaZipNewInfo}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Qua\-Zip\-New\-Info::Qua\-Zip\-New\-Info (const QString \& {\em name}, const QString \& {\em file})}\label{structQuaZipNewInfo_d47cf11f4277edcb09a8ba2b2963f2a9}


Constructs \doxyref{Qua\-Zip\-New\-Info}{p.}{structQuaZipNewInfo} instance. 

Initializes name with {\em name\/} and date\-Time with timestamp of the file named {\em file\/}. If the {\em file\/} does not exists or its timestamp is inaccessible (e. g. you do not have read permission for the directory file in), uses current date and time. Attributes are initialized with zeros, comment and extra field with null values.

\begin{Desc}
\item[See also:]\doxyref{set\-File\-Date\-Time()}{p.}{structQuaZipNewInfo_2b18b554d056877a2f33ffb9d241ed85} \end{Desc}


\subsection{Member Function Documentation}
\index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!setFileDateTime@{setFileDateTime}}
\index{setFileDateTime@{setFileDateTime}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Qua\-Zip\-New\-Info::set\-File\-Date\-Time (const QString \& {\em file})}\label{structQuaZipNewInfo_2b18b554d056877a2f33ffb9d241ed85}


Sets the file timestamp from the existing file. 

Use this function to set the file timestamp from the existing file. Use it like this: 

\begin{Code}\begin{verbatim} QuaZipFile zipFile(&zip);
 QFile file("file-to-add");
 file.open(QIODevice::ReadOnly);
 QuaZipNewInfo info("file-name-in-archive");
 info.setFileDateTime("file-to-add"); // take the timestamp from file
 zipFile.open(QIODevice::WriteOnly, info);
\end{verbatim}\end{Code}



This function does not change date\-Time if some error occured (e. g. file is inaccessible). 

\subsection{Member Data Documentation}
\index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!name@{name}}
\index{name@{name}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QString \bf{Qua\-Zip\-New\-Info::name}}\label{structQuaZipNewInfo_2bdef01b6ac3326e48598e32bfa5fbe8}


File name. 

This field holds file name inside archive, including path relative to archive root. \index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!dateTime@{dateTime}}
\index{dateTime@{dateTime}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QDate\-Time \bf{Qua\-Zip\-New\-Info::date\-Time}}\label{structQuaZipNewInfo_ec7f3ac72c72a2e10b82ad64c2fa3453}


File timestamp. 

This is the last file modification date and time. Will be stored in the archive central directory. It is a good practice to set it to the source file timestamp instead of archive creating time. Use \doxyref{set\-File\-Date\-Time()}{p.}{structQuaZipNewInfo_2b18b554d056877a2f33ffb9d241ed85} or \doxyref{Qua\-Zip\-New\-Info(const QString\&, const QString\&)}{p.}{structQuaZipNewInfo_d47cf11f4277edcb09a8ba2b2963f2a9}. \index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!comment@{comment}}
\index{comment@{comment}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QString \bf{Qua\-Zip\-New\-Info::comment}}\label{structQuaZipNewInfo_e24b1d38c3550b4724862ffcf8f20924}


File comment. 

Will be encoded using \doxyref{Qua\-Zip::get\-Comment\-Codec()}{p.}{classQuaZip_25a8d6963e62eaff007569001e8715c4}. \index{QuaZipNewInfo@{Qua\-Zip\-New\-Info}!uncompressedSize@{uncompressedSize}}
\index{uncompressedSize@{uncompressedSize}!QuaZipNewInfo@{Qua\-Zip\-New\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ulong \bf{Qua\-Zip\-New\-Info::uncompressed\-Size}}\label{structQuaZipNewInfo_18c079b3f2f5ab6eecdd61d6dbe93be6}


Uncompressed file size. 

This is only needed if you are using raw file zipping mode, i. e. adding precompressed file in the zip archive. 

The documentation for this struct was generated from the following files:\begin{CompactItemize}
\item 
quazip/quazipnewinfo.h\item 
quazip/quazipnewinfo.cpp\end{CompactItemize}
